home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 61 / Quick PC 61.iso / I386 / UDDIWEB.MSI / default.aspx < prev    next >
Encoding:
ASP.NET Web Form  |  2003-02-21  |  5.8 KB  |  200 lines

  1. <%@ Page Language='C#' Inherits='UDDI.Web.UddiPage'%>
  2. <%@ Register Tagprefix='uddi' Tagname='Header' Src='controls/header.ascx' %>
  3. <%@ Register Tagprefix='uddi' Tagname='Footer' Src='controls/footer.ascx' %>
  4. <%@ Register Tagprefix='uddi' Tagname='BreadCrumb' Src='controls/breadcrumb.ascx' %>
  5. <%@ Register TagPrefix='uddi' Namespace='UDDI.Web' Assembly='uddi.web' %>
  6. <%@ Import Namespace='UDDI.API' %>
  7. <%@ Import Namespace='UDDI.API.ServiceType' %>
  8. <%@ Import Namespace='UDDI' %>
  9. <%@ Import Namespace='System.Data' %>
  10. <%@ Import Namespace='System.Globalization' %>
  11.  
  12.  
  13. <script language='C#' runat='server'>
  14.     string root = "/";
  15.     protected void Page_Load( object sender, EventArgs e )
  16.     {
  17.         root = ((Request.ApplicationPath=="/") ? ""  : Request.ApplicationPath );
  18.         breadcrumb.AddBlurb( Localization.GetString( "HEADING_WELCOME" ), null, null, null, false );
  19.     }
  20.     
  21.     
  22.     protected string GetHelpPath( string file )
  23.     {
  24.         CultureInfo culture = UDDI.Localization.GetCulture();
  25.         
  26.         string isoLangCode = culture.LCID.ToString();
  27.  
  28.         string defaultlang = Config.GetString( "Setup.WebServer.ProductLanguage", "en" );
  29.         int lcid = 0;
  30.  
  31.         //
  32.         // 'cultureIDValue is expected to contain a neutral culture.  ie,
  33.         // 'en', or 'ko', or 'de'.  All but a few neutral cultures have
  34.         // a default specific culture.  For example, the default specific
  35.         // culture of 'en' is 'en-US'.
  36.         //
  37.         // Traditional & simplified Chinese (zh-CHT and zh-CHS respectively)
  38.         // are examples of neutral cultures which have no default specific
  39.         // culture!
  40.         //
  41.         // So what happens below is this:  First we try to lookup the default
  42.         // specific culture for the neutral culture that we were given.  If that
  43.         // fails (ie, if CreateSpecificCulture throws), we just get the lcid
  44.         // of the neutral culture.
  45.         //
  46.         try
  47.         {
  48.             lcid = CultureInfo.CreateSpecificCulture( defaultlang ).LCID;
  49.         }
  50.         catch
  51.         {
  52.             CultureInfo ci = new CultureInfo( defaultlang );
  53.             lcid = ci.LCID;
  54.         }
  55.  
  56.         string url = root + "/help/" + isoLangCode + "/" + file + ".aspx";
  57.         
  58.         if( !System.IO.File.Exists( Server.MapPath( url ) ) )
  59.             url = root + "/help/" + lcid.ToString() + "/" + file + ".aspx";
  60.     
  61.         return url;
  62.     }
  63. </script>
  64. <uddi:StyleSheetControl
  65.     Runat='server'
  66.     Default='./stylesheets/uddi.css' 
  67.     Downlevel='./stylesheets/uddidl.css' 
  68.     />
  69. <uddi:PageStyleControl 
  70.     Runat='server'
  71.     OnClientContextMenu='Document_OnContextMenu()'
  72.     ShowHeader='true'
  73.     ShowFooter='true'
  74.     Title="TITLE"
  75.     AltTitle="TITLE_ALT"    
  76.     />
  77. <uddi:ClientScriptRegister
  78.     Runat='server'
  79.     Source='./client.js'
  80.     Language='javascript'
  81.     />
  82.  
  83. <uddi:SecurityControl 
  84.     Runat='server' 
  85.     />    
  86.  
  87. <form Runat='server'>
  88.     <table width='100%' border='0' height='100%' cellpadding='0' cellspacing='0'>
  89.         <asp:PlaceHolder
  90.             Id='HeaderBag'
  91.             Runat='server'
  92.             >
  93.             <tr height='95'>
  94.                 <td>
  95.                     <!-- Header Control Here -->
  96.                     <uddi:Header
  97.                         Runat='server' 
  98.                         />
  99.                 </td>
  100.             </tr>
  101.         </asp:PlaceHolder>
  102.         <tr height='100%'>
  103.             <td>
  104.                 <!-- Main Content Here -->
  105.                 <uddi:BreadCrumb 
  106.                     ID='breadcrumb' 
  107.                     Runat='server' 
  108.                     />
  109.                 <table cellpadding='10' cellspacing='0' border='0' width='100%'  height='100%' >
  110.                     <tr>
  111.                         <td valign='top''>
  112.                             <uddi:UddiLabel 
  113.                                 Text='[[HELP_BLOCK_HOME]]' 
  114.                                 CssClass='helpBlock' Runat='server' 
  115.                                 />
  116.                             <br>
  117.                             <br>
  118.                             <br>                            
  119.                             <table cellpadding='5' cellspacing='0' border='0' class='welcomeBox' width='100%'>
  120.                                 <tr>
  121.                                     <th align='left'>
  122.                                         <uddi:UddiLabel 
  123.                                             Text='[[HEADING_GET_STARTED]]' 
  124.                                             Runat='server' 
  125.                                             />
  126.                                     </th>
  127.                                 </tr>
  128.                                 <tr>
  129.                                     <td style='border-bottom: solid 1px #BBBBBB'>
  130.                                         <uddi:UddiLabel 
  131.                                             Text='[[HELP_BLOCK_GET_STARTED]]' 
  132.                                             Runat='server' 
  133.                                             />
  134.                                     </td>
  135.                                 </tr>
  136.                                 <tr>
  137.                                     <td style='border-bottom: solid 1px #BBBBBB'>
  138.                                         <table cellpadding='5' cellspacing='0' border='0'>
  139.                                             <tr>
  140.                                                 <td>
  141.                                                     <a href='javascript:ShowHelp( "<%=GetHelpPath( "publish.gettingstarted" )%>" );'>
  142.                                                         <img src='images/stepbystepguide.gif' border='0'>
  143.                                                     </a>
  144.                                                 </td>
  145.                                                 <td>
  146.                                                     <a href='javascript:ShowHelp( "<%=GetHelpPath( "publish.gettingstarted" )%>" );'>
  147.                                                         <uddi:LocalizedLabel 
  148.                                                             Name='HEADING_STEP_BY_STEP_GUIDE' 
  149.                                                             Runat='server' />
  150.                                                     </a>
  151.                                                     <br>
  152.                                                     <uddi:UddiLabel 
  153.                                                         Text='[[TEXT_STEP_BY_STEP_GUIDE]]' 
  154.                                                         Runat='server' 
  155.                                                         />
  156.                                                 </td
  157.                                             </tr>
  158.                                         </table>
  159.                                     </td>
  160.                                 </tr>
  161.                                 <tr>
  162.                                     <td style='border-bottom: solid 1px #BBBBBB'>
  163.                                         <table cellpadding='5' cellspacing='0' border='0' Class='helpBlock'>                                
  164.                                             <tr>
  165.                                                 <td><a href='http://go.microsoft.com/fwlink/?linkid=5202&clcid=0x409' target='_new'><img src='images/resourcesonweb.gif' border='0'></a></td>
  166.                                                 <td>
  167.                                                     <a href='http://go.microsoft.com/fwlink/?linkid=5202&clcid=0x409' target='_new'><uddi:LocalizedLabel Name='HEADING_ADDITIONAL_RESOURCES' Runat='server' /></a><br>
  168.                                                     <uddi:UddiLabel 
  169.                                                         Text='[[TEXT_ADDITIONAL_RESOURCES]]' 
  170.                                                         Runat='server' 
  171.                                                         />
  172.                                                 </td
  173.                                             </tr>
  174.                                         </table>                                        
  175.                                     </td>
  176.                                 </tr>
  177.                             </table>
  178.                         </td>
  179.                     </tr>
  180.                 </table>
  181.                 
  182.                 
  183.             </td>
  184.         </tr>
  185.         <asp:PlaceHolder 
  186.             Id='FooterBag'
  187.             Runat='server'
  188.             >
  189.             <tr height='95'>
  190.                 <td>
  191.                     <!-- Footer Control Here -->
  192.                     <uddi:Footer
  193.                         Runat='server' 
  194.                         />
  195.                 </td>
  196.             </tr>
  197.         </asp:PlaceHolder>
  198.     </table> 
  199. </form>
  200.